package lab02.Test05;

/**
 * Created by 卡01 on 2017/10/25.
 */
public class Cube {
    //属性：长、宽、高
    float length;
    float width;
    float height;

    public void setDenmo(){
        this.length=3;
        this.width=4;
        this.height=5;
    }
    //行为、方法：求立方体体积
    public float getVolume(){
        return this.length*this.width*this.height;
    }
    //构造函数
    //main函数
    public static void main(String[] args) {
        Cube b=new Cube();
        b.setDenmo();
        System.out.println("立方体b的体积是"+b.getVolume());
    }
}


